From fef4f0704aaa25e68bcd13c139a1549fd20039a3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Timm=20B=C3=A4der?= Date: Sat, 24 Feb 2018 10:49:30 +0100 Subject: [PATCH] textview: Use content size when validating contents --- gtk/gtktextview.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c index 8abb165e97..85daa761d0 100644 --- a/gtk/gtktextview.c +++ b/gtk/gtktextview.c @@ -2482,7 +2482,7 @@ gtk_text_view_queue_scroll (GtkTextView *text_view, static gboolean gtk_text_view_flush_scroll (GtkTextView *text_view) { - GtkAllocation allocation; + int height; GtkTextIter iter; GtkTextPendingScroll *scroll; gboolean retval; @@ -2513,10 +2513,10 @@ gtk_text_view_flush_scroll (GtkTextView *text_view) * the screen. */ DV(g_print (">Validating scroll destination ("G_STRLOC")\n")); - gtk_widget_get_allocation (widget, &allocation); + height = gtk_widget_get_height (widget); gtk_text_layout_validate_yrange (text_view->priv->layout, &iter, - -(allocation.height * 2), - allocation.height * 2); + - (height * 2), + height * 2); DV(g_print (">Done validating scroll destination ("G_STRLOC")\n")); -- 2.30.2